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

Incorrect number of commits before head for shown output. #989

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

cgeroux
Copy link
Contributor

@cgeroux cgeroux commented Apr 30, 2024

This pull request Closes #963

As I followed along, the git diff HEAD~3 on episode 5 references a commit back one commit further than my history. This leads to the output fatal: ambiguous argument 'HEAD~3': unknown revision or path not in the working tree..

It is possible if a previous aside (the directories callout) is followed that this will not generate unknown revision issue. With this change with the directories callout skipped it will produce output that is consistent with that shown in the lesson. If the directories callout is followed, it will produce inconsistent output, however, it will not produce the "fatal" error as it does now in the situation where the "directories" callout isn't followed.

A competing solution would be to make the "directories" callout not a callout, but part of the flow of the workshop. However, in general it does seem to me that the "directories" callout really should be a callout and isn't critical to the overall flow of the lesson.

As I followed along, the $ git diff HEAD~3 is back one commit further than my history. It is possible if a previous aside is followed that this might not generate an error about that version not existing, however, the output shown indicates no such commit. So the command is inconsistent with the output shown. A simple fix is to replace the "3" with a "2"
Copy link

🆗 Pre-flight checks passed 😃

This pull request has been checked and contains no modified workflow files, spoofing, or invalid commits.

It should be safe to Approve and Run the workflows that need maintainer approval.

@kekoziar
Copy link
Contributor

@cgeroux will you verify which commits you entered (git log)? There should be four at that point.

@cgeroux
Copy link
Contributor Author

cgeroux commented Apr 30, 2024

I only have three:

`$ git log
commit aa9678528ef6ae74ccddd2ca1955a1f4ea2ffb79 (HEAD -> main)
Author: Chris Geroux [email protected]
Date: Tue Apr 30 11:05:45 2024 -0300

Discuss concerns about Mars' climate for Mummy

commit 745ca038a4d6adc760095b46f40004730efcf0a5
Author: Chris Geroux [email protected]
Date: Tue Apr 30 10:52:02 2024 -0300

Add concerns about effects of Mars' moons on Wolfman

commit 2ea1847fc9f697d706b571f32337313aece2ef55
Author: Chris Geroux [email protected]
Date: Tue Apr 30 10:37:29 2024 -0300

Start notes on Mars as a base

`

@cgeroux
Copy link
Contributor Author

cgeroux commented Apr 30, 2024

If I did an extra commit, as mentioned in the "Directories" callout:

git commit -m "Add some initial thoughts on spaceships"

I would then have four.

@cgeroux
Copy link
Contributor Author

cgeroux commented Apr 30, 2024

Another possibility to have 4 commits would be from the commit in the "COMMITTING MULTIPLE FILES" exercise.

$ git commit -m "Write plans to start a base on Venus"

@martinosorb
Copy link
Contributor

Moving from HEAD~3 to HEAD~2 seems sufficiently harmless to me. @swcarpentry/git-novice-maintainers shall we merge?

@erinmgraham
Copy link
Contributor

I'm happy to merge.

@martinosorb martinosorb merged commit e00fb57 into swcarpentry:main Jul 3, 2024
1 check passed
github-actions bot pushed a commit that referenced this pull request Jul 3, 2024
Auto-generated via {sandpaper}
Source  : e00fb57
Branch  : main
Author  : Martino Sorbaro <[email protected]>
Time    : 2024-07-03 13:11:36 +0000
Message : Merge pull request #989 from cgeroux/main

Incorrect number of commits before head for shown output.
github-actions bot pushed a commit that referenced this pull request Jul 3, 2024
Auto-generated via {sandpaper}
Source  : b218c81
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-07-03 13:12:21 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : e00fb57
Branch  : main
Author  : Martino Sorbaro <[email protected]>
Time    : 2024-07-03 13:11:36 +0000
Message : Merge pull request #989 from cgeroux/main

Incorrect number of commits before head for shown output.
github-actions bot pushed a commit that referenced this pull request Jul 9, 2024
Auto-generated via {sandpaper}
Source  : b218c81
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-07-03 13:12:21 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : e00fb57
Branch  : main
Author  : Martino Sorbaro <[email protected]>
Time    : 2024-07-03 13:11:36 +0000
Message : Merge pull request #989 from cgeroux/main

Incorrect number of commits before head for shown output.
github-actions bot pushed a commit to nsoranzo/git-novice that referenced this pull request Jul 9, 2024
Auto-generated via {sandpaper}
Source  : e00fb57
Branch  : main
Author  : Martino Sorbaro <[email protected]>
Time    : 2024-07-03 13:11:36 +0000
Message : Merge pull request swcarpentry#989 from cgeroux/main

Incorrect number of commits before head for shown output.
github-actions bot pushed a commit to nsoranzo/git-novice that referenced this pull request Jul 9, 2024
Auto-generated via {sandpaper}
Source  : a7d0e80
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-07-09 00:54:56 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : e00fb57
Branch  : main
Author  : Martino Sorbaro <[email protected]>
Time    : 2024-07-03 13:11:36 +0000
Message : Merge pull request swcarpentry#989 from cgeroux/main

Incorrect number of commits before head for shown output.
github-actions bot pushed a commit to nsoranzo/git-novice that referenced this pull request Jul 16, 2024
Auto-generated via {sandpaper}
Source  : a7d0e80
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-07-09 00:54:56 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : e00fb57
Branch  : main
Author  : Martino Sorbaro <[email protected]>
Time    : 2024-07-03 13:11:36 +0000
Message : Merge pull request swcarpentry#989 from cgeroux/main

Incorrect number of commits before head for shown output.
github-actions bot pushed a commit to nsoranzo/git-novice that referenced this pull request Jul 23, 2024
Auto-generated via {sandpaper}
Source  : a7d0e80
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-07-09 00:54:56 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : e00fb57
Branch  : main
Author  : Martino Sorbaro <[email protected]>
Time    : 2024-07-03 13:11:36 +0000
Message : Merge pull request swcarpentry#989 from cgeroux/main

Incorrect number of commits before head for shown output.
github-actions bot pushed a commit to nsoranzo/git-novice that referenced this pull request Jul 30, 2024
Auto-generated via {sandpaper}
Source  : a7d0e80
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-07-09 00:54:56 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : e00fb57
Branch  : main
Author  : Martino Sorbaro <[email protected]>
Time    : 2024-07-03 13:11:36 +0000
Message : Merge pull request swcarpentry#989 from cgeroux/main

Incorrect number of commits before head for shown output.
github-actions bot pushed a commit to nsoranzo/git-novice that referenced this pull request Aug 6, 2024
Auto-generated via {sandpaper}
Source  : a7d0e80
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-07-09 00:54:56 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : e00fb57
Branch  : main
Author  : Martino Sorbaro <[email protected]>
Time    : 2024-07-03 13:11:36 +0000
Message : Merge pull request swcarpentry#989 from cgeroux/main

Incorrect number of commits before head for shown output.
github-actions bot pushed a commit to nsoranzo/git-novice that referenced this pull request Aug 13, 2024
Auto-generated via {sandpaper}
Source  : a7d0e80
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-07-09 00:54:56 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : e00fb57
Branch  : main
Author  : Martino Sorbaro <[email protected]>
Time    : 2024-07-03 13:11:36 +0000
Message : Merge pull request swcarpentry#989 from cgeroux/main

Incorrect number of commits before head for shown output.
github-actions bot pushed a commit to nsoranzo/git-novice that referenced this pull request Aug 20, 2024
Auto-generated via {sandpaper}
Source  : a7d0e80
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-07-09 00:54:56 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : e00fb57
Branch  : main
Author  : Martino Sorbaro <[email protected]>
Time    : 2024-07-03 13:11:36 +0000
Message : Merge pull request swcarpentry#989 from cgeroux/main

Incorrect number of commits before head for shown output.
github-actions bot pushed a commit to nsoranzo/git-novice that referenced this pull request Aug 27, 2024
Auto-generated via {sandpaper}
Source  : a7d0e80
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-07-09 00:54:56 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : e00fb57
Branch  : main
Author  : Martino Sorbaro <[email protected]>
Time    : 2024-07-03 13:11:36 +0000
Message : Merge pull request swcarpentry#989 from cgeroux/main

Incorrect number of commits before head for shown output.
github-actions bot pushed a commit to nsoranzo/git-novice that referenced this pull request Sep 3, 2024
Auto-generated via {sandpaper}
Source  : a7d0e80
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-07-09 00:54:56 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : e00fb57
Branch  : main
Author  : Martino Sorbaro <[email protected]>
Time    : 2024-07-03 13:11:36 +0000
Message : Merge pull request swcarpentry#989 from cgeroux/main

Incorrect number of commits before head for shown output.
github-actions bot pushed a commit to nsoranzo/git-novice that referenced this pull request Sep 10, 2024
Auto-generated via {sandpaper}
Source  : a7d0e80
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-07-09 00:54:56 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : e00fb57
Branch  : main
Author  : Martino Sorbaro <[email protected]>
Time    : 2024-07-03 13:11:36 +0000
Message : Merge pull request swcarpentry#989 from cgeroux/main

Incorrect number of commits before head for shown output.
github-actions bot pushed a commit to nsoranzo/git-novice that referenced this pull request Sep 17, 2024
Auto-generated via {sandpaper}
Source  : a7d0e80
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-07-09 00:54:56 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : e00fb57
Branch  : main
Author  : Martino Sorbaro <[email protected]>
Time    : 2024-07-03 13:11:36 +0000
Message : Merge pull request swcarpentry#989 from cgeroux/main

Incorrect number of commits before head for shown output.
github-actions bot pushed a commit to nsoranzo/git-novice that referenced this pull request Sep 24, 2024
Auto-generated via {sandpaper}
Source  : a7d0e80
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-07-09 00:54:56 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : e00fb57
Branch  : main
Author  : Martino Sorbaro <[email protected]>
Time    : 2024-07-03 13:11:36 +0000
Message : Merge pull request swcarpentry#989 from cgeroux/main

Incorrect number of commits before head for shown output.
github-actions bot pushed a commit to nsoranzo/git-novice that referenced this pull request Oct 1, 2024
Auto-generated via {sandpaper}
Source  : a7d0e80
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-07-09 00:54:56 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : e00fb57
Branch  : main
Author  : Martino Sorbaro <[email protected]>
Time    : 2024-07-03 13:11:36 +0000
Message : Merge pull request swcarpentry#989 from cgeroux/main

Incorrect number of commits before head for shown output.
github-actions bot pushed a commit to nsoranzo/git-novice that referenced this pull request Oct 8, 2024
Auto-generated via {sandpaper}
Source  : a7d0e80
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-07-09 00:54:56 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : e00fb57
Branch  : main
Author  : Martino Sorbaro <[email protected]>
Time    : 2024-07-03 13:11:36 +0000
Message : Merge pull request swcarpentry#989 from cgeroux/main

Incorrect number of commits before head for shown output.
github-actions bot pushed a commit to nsoranzo/git-novice that referenced this pull request Oct 15, 2024
Auto-generated via `{sandpaper}`
Source  : a7d0e80
Branch  : md-outputs
Author  : GitHub Actions <[email protected]>
Time    : 2024-07-09 00:54:56 +0000
Message : markdown source builds

Auto-generated via {sandpaper}
Source  : e00fb57
Branch  : main
Author  : Martino Sorbaro <[email protected]>
Time    : 2024-07-03 13:11:36 +0000
Message : Merge pull request swcarpentry#989 from cgeroux/main

Incorrect number of commits before head for shown output.
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.

Misleading Interplay between Episode 4 and 5
4 participants