Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imposed master branch #348

Merged
merged 55 commits into from
May 17, 2024
Merged

imposed master branch #348

merged 55 commits into from
May 17, 2024

Conversation

nbehrnd
Copy link
Contributor

@nbehrnd nbehrnd commented Apr 21, 2024

@Gazler Where deemed suitable, I added a line system "git branch -m master" and lightly edited the description of the tasks in levels 2 up and including 55. As a result, the locally build rubygem and its locally installed executable works regardless that my ~/.gitconfig includes an entry of

[init]
	defaultBranch = main

Can you please have a look on this? To ease the revision by a second party, edits to each level are intentionally retained in its own commit.


Level 28/push however is somewhat odd. Because I can run

$ git pull
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint: 
hint:   git config pull.rebase false  # merge
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
$ git config pull.rebase true
$ git pull
Successfully rebased and updated refs/heads/master.
$ git push
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 4 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 600 bytes | 600.00 KiB/s, done.
Total 6 (delta 2), reused 0 (delta 0), pack-reused 0
To /tmp/d20240421-13523-hc2e0e/.git
   177f11e..934c868  master -> master
$ 
$ githug
********************************************************************************
*                                    Githug                                    *
********************************************************************************
Congratulations, you have solved the level!

though the commits just prior to the push likely are not in the sequence the initial design of this question aims for. I would accept if I'm wrong on this point.


I'm not yet comfortable to test the quizz of level 50 / stage_lines; however, because this is a git technique so far not used. It is a bit beyond resolving merge conflicts I usually resolve with git mergetool.

nbehrnd added 30 commits April 8, 2024 15:09
Irrespective of a defaultBranch definition in file .gitconfig,
the edit allows to pass a commit to be accepted.

Signed-off-by: Norwid Behrnd <[email protected]>
Contrasting to the previous version, the name of the principal
branch is explicitly defined.  The description of the task ahead
is lightly edited.

Signed-off-by: Norwid Behrnd <[email protected]>
Explicit definition of the principal branch as master, and a
light edit of the description of the task ahead.

Signed-off-by: Norwid Behrnd <[email protected]>
Explicitly define the principal branch as master.  Light edit
of the description of the task ahead and of the hint about the
solution.

Signed-off-by: Norwid Behrnd <[email protected]>
Explicitly define the principal branch as master.  Light edit
of the description of the task ahead, light lint of the source
code.

Signed-off-by: Norwid Behrnd <[email protected]>
Explicitly define the principal branch as master.  Light edit
of the description about the task ahead.

Signed-off-by: Norwid Behrnd <[email protected]>
Explicitly define the principal branch as master.  Light edit
of the description of the task ahead.

Signed-off-by: Norwid Behrnd <[email protected]>
nbehrnd added 23 commits April 21, 2024 18:26
@Gazler
Copy link
Owner

Gazler commented Apr 22, 2024

This looks good. I was initially curious as to why this wasn't in repo.init or init_from_level but it looks like it doesn't always apply at the start of the level setup.

By the way, for the stage_lines level, you want to use git add -p :)

@nbehrnd
Copy link
Contributor Author

nbehrnd commented Apr 22, 2024

«Hunk editing» is a thing I'm not yet confident in; thus the particular note to have the corresponding quiz be checked by someone who is.

One incentive for me to see githug working regardless of the entry of ~.gitignore file is that is serves like a test pad to memorize git. A bit like Anki flash cards, but with the advantage that one can issue other commands prior/after «the real command» the quiz is after to monitor the state and change of the git repository. This is more than «only» check e.g., if one knows the equivalent of for instance English «blue» as French «bleu» while learning a natural language.

Eventually, the slight modification by the lines of git branch -m master would allow to mark a couple of issues filed as resolved, and submit a new version to rubygems (including an explicit entry about the MIT license of the project, as suggested in PR #346).

grit which currently is used as interface between Ruby and grit is stated as no longer maintained (ref). A transition to libgit2/rugged (entry on rubygems) hence might be a next leap to consider for the over next version of githug i.e., 0.7.0. An increased visibility of githug in general as well as attracting help for this transition could be achieved for instance if it were packaged for Debian. As I did this for syntax checker markdownlint (relevant thread), were you be comfortable if a) I would do this after your release of githug 0.6.0 to rubygems while indicating b) you as the upstream-contact to Debian?

@Gazler
Copy link
Owner

Gazler commented Apr 30, 2024

I haven't forgotten about this btw. It looks good, I just need to confirm about the push level. I think it should be fine just looking at the code and tests, but need to double check.

@nbehrnd
Copy link
Contributor Author

nbehrnd commented Apr 30, 2024 via email

@Gazler Gazler merged commit 8229a4c into Gazler:master May 17, 2024
1 check passed
@Gazler
Copy link
Owner

Gazler commented May 17, 2024

Thanks so much for this <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants